//
//  GFHomeShowCollectionViewCell.m
//  GoodFood
//
//  Created by dllo on 15/11/5.
//  Copyright © 2015年 荣伟峰. All rights reserved.
//

#import "GFHomeShowCollectionViewCell.h"

@interface GFHomeShowCollectionViewCell ()
@property (nonatomic, retain) UIImageView *imageView;
@end

@implementation GFHomeShowCollectionViewCell
- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        
        self.imageView = [[UIImageView alloc] init];
        [self.contentView addSubview:self.imageView];

        
    }
    return self;
}




#pragma mark _ 展示时定义imageView位置
- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes {
    
    self.imageView.frame = self.contentView.frame;
}

- (void)setModel:(GFHomeModel *)model {
    if (_model != model) {
        
        _model = model;
    }
    if (model.image_url) {
            [self.imageView setImageWithURL:[NSURL URLWithString:model.image_url] placeholderImage:[UIImage imageNamed:@"category_1"]];
    }


}

@end
